<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/head.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>人员管理</title>
<script type="text/javascript" src="<%=basePath%>/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="<%=basePath%>/js/publicjs.js"></script>
<script type="text/javascript" src="<%=basePath%>/js/jquery.colorbox.js"></script>
<link media="screen" rel="stylesheet" href="<%=basePath%>/css/colorbox.css" />
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
-->
</style>
</head>

<body>
<jsp:include page="../top.jsp"></jsp:include>
<jsp:include page="../left.jsp"></jsp:include>
<div style="height:470px;width:1077px;background-color:#FFFFFF;margin-left: 3px;float:left; ">
<div>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="6%" height="19" valign="bottom"><div align="center"><img src="<%=request.getContextPath() %>/images/tb.gif" width="14" height="14" /></div></td>
                <td width="94%" valign="bottom"><span class="STYLE7"> 管理人员基本信息列表</span></td>
              </tr>
            </table></td>
            <td><div align="right"><span class="STYLE7">
              <input type="checkbox" name="quanxuan" id="quanxuan" />全选&nbsp;&nbsp;
              <span style="cursor:pointer"  id="addemployee" title="增加新用户"><img src="<%=request.getContextPath() %>/images/add.gif" width="10" height="10" />添加 </span>&nbsp;&nbsp;
              <span style="cursor:pointer"  id="delemployee" title="删除用户"><img src="<%=request.getContextPath() %>/images/del.gif" width="10" height="10" />删除 </span>&nbsp;&nbsp;
              <span style="cursor:pointer"  id="editemployee" title="修改用户信息"><img src="<%=request.getContextPath() %>/images/edit.gif" width="10" height="10" />编辑</span>&nbsp;&nbsp;
              </span><span class="STYLE7"> &nbsp;</span></div></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
      <tr>
        <td width="4%" height="20" bgcolor="d3eaef" class="STYLE10"><div align="center">
          选择
        </div></td>
        <td width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">用户名</span></div></td>
        <td width="15%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">用户角色</span></div></td>
        <td width="14%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">联系方式</span></div></td>
        <td width="16%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">Email</span></div></td>
        <td width="27%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">详细描述</span></div></td>
      </tr>
      <s:iterator value="page.list" status="state">
      <tr>
        <td height="20" bgcolor="#FFFFFF"><div align="center">
        <s:if test="id!=1">
          <input type="checkbox" name="checkbox2" id="checkbox2" value="<s:property value="id"/>"/>
          </s:if>
        </div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center"><span class="STYLE19"><s:property value="username"/> </span></div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><s:property value="roleid"/></div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><s:property value="linktel"/></div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><s:property value="email"/></div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><s:property value="des"/></div></td>
      </tr>
     </s:iterator>
    </table></td>
  </tr>
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td colspan="2" align="right">
        <div id="Pagination" class="pagination">
			<s:property  escape="false"  value="page.new08Nav2"/>
		</div>
        </td>
      </tr>
    </table></td>
  </tr>
</table>
</div>
</div>
<jsp:include page="../down.jsp"></jsp:include>
</body>
</html>
<script type="text/javascript">
<!--
$(function (){
	//新增用户
	$("#addemployee").click(function() {
		$("#addemployee").colorbox( {
			href : "addemp.do",width:"25%",hight:"35%"
		});
	});

	//修改用户信息
	$("#editemployee").click(function() {
		var id = getCheckNum();
		if (id == "" || id.length == 0 || id.length > 1) {
			alert("请选择一条信息！");
			return false;
		} else {
			$("#editemployee").colorbox( {
				href : "addemp.do?id=" + id
			});
		}
	});

	//删除用户信息
	$("#delemployee").click(function() {
		var id = getCheckNum();
		if (id == "" || id.length == 0) {
			alert("请选择要删除的用户信息！");
			return false;
		} else {
			if (!confirm("确定要删除这些用户吗？")) {
				return false;
			} else {
				$.getJSON("delemp.do?ids=" + id, function(data) {
					if (data == 0) {
						alert("删除成功！");
					} else {
						alert("删除失败！");
					}
					location = location;
				});
			}
		}
	});
});
	//-->
</script>
